package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.pojo.core.param.ChargeNavigatorParam;
import com.zhentao.service.ChargeNavigatiorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName: ChargeNavigatorController
 * @Author: 振涛教育_Q
 * @Date: 2024/12/25 21:17
 */
@RestController
@RequestMapping("/auth/core")
public class ChargeNavigatorController {


    @Autowired
    private ChargeNavigatiorInfoService chargeNavigatiorInfoService;
    /**
     * @description  添加导航信息
     * @author 振涛教育_小Q
     * @date    2024/12/25 21:19
      * @param params
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @PostMapping("/insert")
    public ResponseResult insertNavigator(@RequestBody List<ChargeNavigatorParam> params){
        return chargeNavigatiorInfoService.insertNavigator(params);
    }

    /**
     * @description  根据名称查询经纬度
     * @author 振涛教育_小Q
     * @date    2024/12/25 21:19
     * @param
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @PostMapping("/select")
    public ResponseResult selectNavigator(@RequestBody ChargeNavigatorParam params){
        return chargeNavigatiorInfoService.selectNavigator(params);
    }

    /**
     * @description  查询导航点列表
     * @author 振涛教育_小Q
     * @date    2024/12/30 16:31
      * @param
     * @return com.zhentao.model.common.dtos.ResponseResult
     */
    @GetMapping("/list")
    public ResponseResult navigationList(){
        return chargeNavigatiorInfoService.navigationList();
    }
}
